package models;

import java.util.ArrayList;
import java.util.List;

public class Machine {

    public String name;
    public List<Service> services;

    public List<Module> getModules() {
        List<Module> modules = new ArrayList<Module>();
        for(Service service : services) {
            for(Instance instance: service.instances) {
                modules.add(instance.module);
            }
        }

        return modules;
    }
}
